<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 13. 12. 6
 * Time: 오전 11:33
 */

/**
 * gift Array
 */
function giftArray($_data)
{
    $data = array(
        'read' => 'RCV',
        'item_grade' => 0,
        'status_date' => nowDateTime(),
    );

    $data = array_merge($_data, $data);

    return $data;
}

/**
 * billing log array
 */
function billingLogArray($_data)
{
    $data = array(
        'a2x_id' => $_data['a2x_id'],
        'order_id' => $_data['order_id'],
        'order_state' => 'TRSC0030',
        'product_id' => $_data['gem']['product_id'],
        'cash' => $_data['gem']['cash'],
        'reg_date' => $_data['reg_date'],
    );

    return $data;
}

function gemLogArray($_data)
{
    $data = array(
        'a2x_id' => $_data['a2x_id'],
        'gem_use_type' => $_data['gem']['gem_use_type'],
        'gem_amount' => -($_data['gem']['gem']),
        'date' => $_data['reg_date'],
    );

    return $data;
}

function blockLogArray($_data)
{
    $data = array(
        'a2x_id' => $_data['a2x_id'],
        'enable' => 0,
        'start_date' => $_data['start_date'],
        'end_date' => $_data['end_date'],
    );

    return $data;
}